package cn.wsalix.admin.type;

public enum CodeOperaEnum {
	register("1", "注册"),restPwd("2", "重置密码"),recommend("2", "推荐");
	private String code;
	private String title;

	CodeOperaEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static CodeOperaEnum findByCode(String code) {
		for (CodeOperaEnum userKind : CodeOperaEnum.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
